﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text.RegularExpressions;

namespace DotNetDream.Models
{
    public partial class BlogEntry
    {
        #region Field
        public const int SUMMARY_WORDCOUNT = 100;
        #endregion
        #region Properties
        public string NewComment { get; set; }
        public string Summary
        {
            get
            {
                //Replace all user images with a place holder for fast performance
                string summary = Regex.Replace(Content, "<img.*src=.*Storage.*[/]>", "<div style='padding-left:20px;font-size:0.7em'>[PHOTO - See Full mode]</div>");
                return summary;
            }
        }
        #endregion
    }
}